package com.example.study.common.api;

import javax.xml.validation.Validator;

public enum ResultCode implements IResultCode{

    SUCCESS(200, "请求成功"),
    FAILED(300, "请求失败"),

    VALIDATE_FAILED(404, "参数检验失败"),

    UNAUTHORIZED(401, "暂未登录或token已过期");


    private int code;
    private String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
